package com.authine.cloudpivot.ext.model.bosi;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;

/**
 * @author Peter
 * @version 1.0.0
 * @date 2021/4/7 14:15
 * @desc 冀中商品发货Model
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class OrderGoodsDeliverModel {

    /**
     * 供应商网络订单号(冀中订单号)
     */
    private String orderNo;
    /**
     * 配送方式：1快递发货 2自行配送 3采购自提
     */
    private String deliveryType;
    /**
     * 物流单号
     */
    private String expressCode;
    /**
     * 物流公司
     */
    private String expressCompanyName;
    /**
     * 订单发货商品
     */
    private List<BsscOrderDeliverGoodsModel> orderDeliverGoods;

    public static OrderGoodsDeliverModel test() {
        BsscOrderDeliverGoodsModel build1 = BsscOrderDeliverGoodsModel.builder().goodsId("11").num(new BigDecimal("2.00")).build();
        BsscOrderDeliverGoodsModel build2 = BsscOrderDeliverGoodsModel.builder().goodsId("22").num(new BigDecimal("3.00")).build();
        List<BsscOrderDeliverGoodsModel> bsscOrderDeliverGoodsModelList = Arrays.asList(build1, build2);
        return OrderGoodsDeliverModel.builder().orderNo("11111").deliveryType("1").expressCode("22222222").expressCompanyName("京东物流").orderDeliverGoods(bsscOrderDeliverGoodsModelList).build();
    }

}
